<%@include file="ValidarSession.jsp"%>
<%@include file="cabecera.jsp"%>
<form name="form1" method="post" action="CitaBuscarServlet">
<tr>
    <td height="117"><div align="center">
      <div id="algo">


        <table width="626" height="46" border="0">
          <tr>
            <td width="93" valign="middle"><div align="center">Buscar por</div></td>
            <td width="118" valign="middle">
              <div align="center">
                <select name="select" size="1" id="select">
                  <option>Doctor</option>
                  <option>Paciente</option>
                  <option>Fecha</option>
                  <option>Estado</option>
                  <option>Nro</option>
                </select>
                </div></td>
            <td width="37" valign="middle"><div align="center">en</div></td>
            <td width="175" valign="middle"><div align="center">
              <input type="text" name="textfield" id="textfield" />
            </div></td>
            <td width="181" valign="middle"><div align="center">
              <input type="submit" name="nombre" id="button" value="       Buscar        " />
            </div></td>
          </tr>
        </table>
      </div>
    </div></td>
    </tr>
  
    <table width="695" height="121" border="1">
      <tr>
        <td width="45"><div align="center">Nro.</div></td>
        <td width="98"><div align="center">Pabellon</div></td>
        <td width="96"><div align="center">Estado</div></td>
        <td width="149"><div align="center">Doctor</div></td>
        <td width="71"><div align="center">Fecha</div></td>
        <td width="81"><div align="center"> Hora</div></td>
        <td width="109"><div align="center">Motivo</div></td>
        <td width="109"><div align="center">Opciones</div></td>
      </tr>
      <%@page import="java.util.*,trastienda.modelo.Cita" %>
  <%
  	Collection <Cita> listau= (ArrayList <Cita>)request.getAttribute("arreglo");
  	if(listau!=null){
  		for(Cita Cita:listau){%>
  <tr>
    <td><%= Cita.getIdcita() %></td>
    <td><%= Cita.getPabell() %></td>
    <td><%= Cita.getEst() %></td>
    <td><%= Cita.getDoc() %></td>
    <td><%= Cita.getFech() %></td>
    <td><%= Cita.getHora() %></td>
    <td><%= Cita.getMotivo() %></td>
    <td><a href="CitaEditarServlet?idcita=<%= Cita.getIdcita()%>">Editar</a> - <a href="CitaEliminarServlet?idcita=<%= Cita.getIdcita()%>">Eliminar</a></td>
   </tr>
<%
 		}
  	}
%>
</table>
</form>
<%@include file="pie.jsp"%>